package com.example.demo2.test.task;


import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * 定时任务
 * @author yusong
 * @date 20210728
 */

@Component
@EnableScheduling
public class ScheduleTask {




    @Scheduled(fixedDelay = 2000)
    private void sendTrade(){
        System.out.println("sendTrade");
    }


    @Scheduled(fixedDelay = 2000)
    private void subMarket(){
        System.out.println("subMarket");
    }

}
